Skip to content

DOC: use EvtGen in all examples - #602

Draft
redeboer wants to merge 6 commits into
phase-space-backends-evtgenfrom
evtgen-documentation-examples
Draft

redeboer wants to merge 6 commits into
phase-space-backends-evtgenfrom
evtgen-documentation-examples

Conversation

@redeboer

@redeboer redeboer commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Note

This draft documents a possible direction and is not meant to be merged as is. It is based on phase-space-backends-evtgen, which merges #598 and #599.

Preview of the changed documentation pages: Phase space generators, Amplitude analysis, Analytic continuation, and Installation

⚙️ Enhancements

  • TFPhaseSpaceGenerator and TFWeightedPhaseSpaceGenerator are renamed to PhaseSpaceGenerator and WeightedPhaseSpaceGenerator, because they no longer require TensorFlow. The old names remain available as aliases, so existing code keeps working.

📝 Documentation

  • All examples, including Amplitude analysis and Analytic continuation, now generate phase space samples with EvtGenPhaseSpaceGenerator. The intensity-based sample uses the unweighted EvtGen sample as its domain, so it no longer needs WeightedPhaseSpaceGenerator.
  • The Phase space generators page recommends EvtGen and presents PhaseSpaceGenerator with its NumPy, JAX, and TensorFlow backends as an alternative for environments where pyevtgen is unavailable. With the NumPy backend, phasespace only depends on NumPy, so this may include Pyodide, which has not been tested.
  • The benchmark on that page combines the benchmark of BEHAVIOR: generate phase space with NumPy #599 with EvtGen: it times all generators for three-body decays of increasing sample size and for three to eight pions, both for the unweighted generators and for WeightedPhaseSpaceGenerator. EvtGen is the fastest unweighted generator, for instance 0.07 s against 5 s for the fastest phasespace backend for 10,000 six-pion events. The page explains that this is caused by the hit-and-miss step of PhaseSpaceGenerator: phasespace normalizes its weights to a loose upper bound, so the acceptance equals the mean weight, which drops from 0.27 for three pions to 10⁻⁵ for eight. The page therefore recommends WeightedPhaseSpaceGenerator as the domain of an IntensityDistributionGenerator.
  • The four-body section from BEHAVIOR: generate phase space with NumPy #599 compares the Cabibbo–Maksymowicz variables of all four generators.
  • The limitation of EvtGen is described as depending on the final state masses, instead of dropping by a factor of ten per additional particle.

Squash commit messages

* ENH: drop TF prefix from phase space generators

@redeboer redeboer added this to the 0.5.0 milestone Nov 8, 2026
@redeboer redeboer added the 📝 Docs Improvements or additions to documentation label Nov 8, 2026
@redeboer redeboer added the ⚙️ Enhancement Improvements and optimizations of existing features label Nov 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Docs Improvements or additions to documentation ⚙️ Enhancement Improvements and optimizations of existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant